﻿using System;

namespace IntraVision.Web.Toolkit
{
    public static class TableHelper
    {
        public static string RenderTD(object value)
        {
            return RenderTD(value, null);
        }

        public static string RenderTD(object value,string classes)
        {
            string val = "&nbsp;";
            if(value != null && value != DBNull.Value)
                val = value.ToString();
            return String.Format("<td {0}>{1}</td>", (!string.IsNullOrEmpty(classes) ? string.Format("class=\"{0}\"", classes) : ""), val);
        }
    }
}
